import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/base";

// 查询缺陷评论列表
export function listBugComment(query) {
  return request({
    url: '/tms/bug/comment/',
    method: 'get',
    params: query
  })
}

// 查询缺陷评论详细
export function getBugComment(id) {
  return request({
    url: `/tms/bug/comment/${parseStrEmpty(id)}/`,
    method: 'get'
  })
}

// 新增缺陷评论
export function addBugComment(data) {
  return request({
    url: '/tms/bug/comment/',
    method: 'post',
    data: data
  })
}

// 修改缺陷评论
export function updateBugComment(data) {
  return request({
    url: `/tms/bug/comment/${data.id}/`,
    method: 'put',
    data: data
  })
}

// 删除缺陷评论
export function delBugComment(id) {
  return request({
    url: `/tms/bug/comment/${id}/`,
    method: 'delete'
  })
}